<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>-</title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <!-- basic styles -->

    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="assets/css/font-awesome.min.css"/>

    <!-- page specific plugin styles -->

    <link rel="stylesheet" href="assets/css/jquery-ui-1.10.3.full.min.css"/>
    <link rel="stylesheet" href="assets/css/datepicker.css"/>
    <link rel="stylesheet" href="assets/css/ui.jqgrid.css"/>
    <link rel="stylesheet" href="assets/css/chosen.css" />

    <!-- fonts -->


    <!-- ace styles -->

    <link rel="stylesheet" href="assets/css/ace.min.css"/>
    <link rel="stylesheet" href="assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="assets/css/ace-skins.min.css"/>
    <!-- inline styles related to this page -->

    <!-- ace settings handler -->

    <script src="assets/js/ace-extra.min.js"></script>

</head>

<body>

<div class="main-container" id="main-container">
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div id="resultlist">
                    <table id="grid-table"></table>
                </div>
                <div id="grid-pager"></div>

                <div id="dialog" title="历史" style="display: none">
                    <div>
                        <table id="new-table"></table>
                    </div>
                    <div id="new-pager"></div>
                </div>
                <script type="text/javascript">
                    var $path_base = "/";//this will be used in gritter alerts containing images
                </script>

                <!-- PAGE CONTENT ENDS -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /.page-content -->
</div>
<!-- /.main-content -->


<!-- /.main-container -->

<!-- basic scripts -->

<!--[if !IE]> -->

<script src="assets/js/jquery.min.js"></script>

<!-- <![endif]-->

<!--[if !IE]> -->

<script type="text/javascript">
    window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
</script>

<!-- <![endif]-->


<script type="text/javascript">
    if ("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
</script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/typeahead-bs2.min.js"></script>

<!-- page specific plugin scripts -->

<script src="assets/js/bootstrap-datepicker.min.js"></script>
<script src="assets/js/jquery.jqGrid.min.js"></script>
<script src="assets/js/grid.locale-en.js"></script>
<script src="assets/js/bootstrap-datepicker.min.js"></script>
<script src="assets/js/bootstrap-timepicker.min.js"></script>
<script src="assets/js/daterangepicker.min.js"></script>

<!-- ace scripts -->

<script src="assets/js/ace-elements.min.js"></script>
<script src="assets/js/ace.min.js"></script>
<script src="assets/js/export.js"></script>
<script src="assets/js/jqgrid.js"></script>
<script type="text/javascript" src="assets/js/dialog/zDrag.js"></script>
<script type="text/javascript" src="assets/js/dialog/zDialog.js"></script>
<!-- inline scripts related to this page -->

<script type="text/javascript">

jQuery(function ($) {
    var grid_selector = "#grid-table";
    var pager_selector = "#grid-pager";

    jQuery(grid_selector).jqGrid({
        //地址
        url: "/jqGrid/select.html",
        //发送数据
        postData: {"jqId":$("#jqId").val(),"sname":$("#sname").val(),"sdate":$("#sdate").val(),"ship":$("#ship").val()},
        //发送方式
        mtype: "get",
        datatype: "json",
        //表格高度
        height: 300,
        width :600 ,
        colNames: ['订单号', '商户订单号', '操作日期' ,'核销状态', '银行名称','消费方式','金额'],
        colModel: [
            {name: 'jqId', index: 'jqId', width: 60, sorttype: "int", editable: true,key:true},
            {name: 'sname', index: 'sname', width: 90, editable: true},
            {name: 'sdate', index: 'sdate', width: 90, editable: true, sorttype: "date", unformat: pickDate,editrules:{date:true}},
            {name: 'stock', index: 'stock', width: 70, editable: true, edittype: "checkbox", editoptions: {value:"1:0"}, unformat: aceSwitch},
            {name: 'ship', index: 'ship', width: 90, editable: true, edittype: "select", editoptions: {value: "招商银行:招商银行;兴业银行:兴业银行;农业银行:农业银行"}},
            {name: 'note', index: 'note', width: 70, sortable: false, editable: true, edittype: "text" ,editable: false},
            {name: 'amt', index: 'amt', width: 60, sortable: false, editable: true, edittype: "text",formatter: 'number',editrules:{number:true}}
        ],

        altRows: true,
        //toppager: true,
        //是否可以多选
        multiselect: true,
        //multikey: "ctrlKey",
        multiboxonly: true,
        //是否显示总数
        footerrow: true,
        userDataOnFooter: true,

        loadComplete: function (xhr) {
            var table = this;
            setTimeout(function () {
                styleCheckbox(table);
                updateActionIcons(table);
                updatePagerIcons(table);
                enableTooltips(table);
            }, 0);
        }

    })

});




</script>
</body>
</html>
